<extend name="../Public/base" />
<block name="title">{$TITLE}列表</block>
<block name="body">
    <div class="text-c">
        <form method="post" action="{:U('Admin/Admin/index')}">
            <input type="text" class="input-text" style="width:250px" placeholder="输入{$TITLE}名称" value="{$keyword}" name="keyword">
            <button type="submit" class="btn btn-success" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜素</button>
        </form>
    </div>
    <div class="cl pd-5 bg-1 bk-gray mt-20">
        <span class="l"><a href="javascript:;" onclick="layer_show('添加{$TITLE}','{:U("Admin/Admin/add")}','800','600')" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 添加管理员</a></span>
        <span class="r">共有数据：<strong>{$count}</strong> 条</span>
    </div>
    <div class="mt-20">
        <table class="table table-border table-bordered table-bg">
            <thead>
            <tr class="text-c">
                <th width="10%">用户名</th>
                <th width="10%">别名</th>
                <th width="10%">角色</th>
                <th width="10%">手机</th>
                <th width="10%">Email</th>
                <th width="10%">创建时间</th>
                <!--<th width="18%">创建IP</th>-->
                <th width="10%">最后登录时间</th>
                <th width="15%">描述</th>
                <!--<th width="18%">最后登录IP</th>-->
                <th width="5%">状态</th>
                <th width="10%">操作</th>
            </tr>
            </thead>
            <tbody>
            <volist name="list" id="info">
                <tr class="text-c">
                    <td>{$info.username}</td>
                    <td>{$info.nickname}</td>
                    <td><eq name='info.admin_id' value="1">特殊身份<else/>{$info.role_name}</eq></td>
                    <td>{$info.mobile}</td>
                    <td>{$info.email}</td>
                    <td>{$info.create_time|date="Y-m-d",###}</td>
                    <!--<td>{$info.create_ip}({$info.create_ip_area})</td>-->
                    <td>{$info.last_time|default = "" |date="Y-m-d",###}</td>
                    <td>{$info.remark}</td>
                    <!--<td>{$info.last_ip}({$info.last_ip_area})</td>-->
                    <td>
                        <eq name='info.status' value='1'>
                            <span class="label label-success radius">已启用</span>
                            <else/>
                            <span class="label radius">已停用</span>
                        </eq>
                    </td>
                    <td class="f-14">
                        <eq name='info.status' value='1'>
                            <a  onclick="admin_change_status('{$info.admin_id}')" href="javascript:;" title="停用"><i class="Hui-iconfont">&#xe631;</i></a>
                            <else/>
                            <a  onclick="admin_change_status('{$info.admin_id}')" href="javascript:;" title="启用"><i class="Hui-iconfont">&#xe615;</i></a>
                        </eq>
                        <a title="修改密码" href="javascript:;" onclick="layer_show('修改密码','{:U('Admin/Admin/editPwd',array('admin_id'=>$info['admin_id']))}','800','600')" class="ml-5">
                            <i class="Hui-iconfont"></i>
                        </a>
                        <a title="编辑" href="javascript:;" onclick="layer_show('编辑{$TITLE}','{:U('Admin/Admin/edit',array('admin_id'=>$info['admin_id']))}','800','600')" class="ml-5">
                            <i class="Hui-iconfont">&#xe6df;</i>
                        </a>
                        <a title="删除" href="javascript:;" onclick="del('{$info.admin_id}','admin_id')" class="ml-5">
                            <i class="Hui-iconfont">&#xe6e2;</i>
                        </a>
                    </td>
                </tr>
            </volist>
            </tbody>
        </table>
    </div>
    <div class='paging_simple_numbers'>
       {$page}
    </div>
</block>
<block name="js">
    <script type="text/javascript">
        function admin_change_status(id) {
            action('确认要改变管理员状态吗？',id,"{:U('Admin/admin/changeStatus')}",'admin_id');
        }
    </script>
</block>
